package com.dongman.mapper;


import com.alibaba.fastjson.JSONObject;
import com.dongman.model.Chapter;
import com.dongman.model.ChapterPic;
import com.dongman.model.Novel;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: lkl
 * @description: 文章Dao层
 */
@Repository
public interface NovelDao {

    void insertNovel(Novel novel);

    void insertChapterBatch(List<Chapter> list);

    void insertChapterPicBatch(List<ChapterPic> list);

    List<Novel> selectNovelChapterAdnPics(Novel novel);

    List<ChapterPic> selectPicsByChapterId(ChapterPic chapterPic);

    List<Novel> selectNovelByNovelId(Novel novel);

    int updateNovel(Novel novel);

    int updateChapterPic(ChapterPic chapterPic);

    List<ChapterPic> selectNotDownPics(ChapterPic chapterPic);

    List<JSONObject> selectNeedToDwonChapters(ChapterPic chapterPic);

    List<ChapterPic> selectChapterByChapterId(Chapter chapter);

}
